<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="org.limp.mine.StringTool"%>
<%
    String context = jt.classic.system.ISystem.getContextPath();
   
    String retUrl = StringTool.checkString(request.getParameter("retUrl")); 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>renew session page</title>
</head>
<jsp:include page="../system/head4nosession.jsp"></jsp:include>
<!-- app template css -->
<link rel="stylesheet" type="text/css" href="<%=context%>/proframe/css/style.css" />
<link rel="stylesheet" type="text/css" href="<%=context%>/app/css/theme4.css" />
<script>
function login(){
     if(isblank(document.getElementById("logid"))){
         Ext.Msg.alert('错误','请输入登录帐号');
     }else if(isblank(document.getElementById("password"))){
         Ext.Msg.alert('错误','请输入登录密码');
     }else{
          var logid = document.getElementById("logid").value;
	     var password = document.getElementById("password").value;
		 setParam2XML("logid", logid);
		 setParam2XML("pwd", password);
         Ext.MessageBox.wait('登录验证过程中...');
        
		Ext.Ajax.request({
					url : context + '/system/staticlogin.do',
					method : 'POST',
					async : false,
					xmlData : getParam2XML(),
					success : function(response, options) {
						var o = Ext.util.JSON
								.decode(response.responseText);
						if (!o.success) {
							Ext.MessageBox.hide();
							if (o.errCode == "-2") {
								Ext.Msg
										.alert('错误',
												'错误的用户名或密码');
							} else if (o.errCode == "-3") {
								Ext.Msg
										.alert('错误',
												'您使用的帐号已失效,请联系管理员重新启用该帐号');

							} else {
								Ext.Msg
										.alert('错误',
												'未知的错误异常,请稍后再试或联系系统管理员');
							}
						} else {
							Ext.MessageBox.hide("成功恢复会话,如果页面没有自动跳转,请点击菜单执行相关操作");
	        <%if(!retUrl.equals("")){%>window.location.href="<%=retUrl%>";<%}%>
						}
					}
				})
     }
}
</script>
<body>
<form id="form1" name="form1" action="" method="post">
<fieldset id="lanmu">
<legend>快捷恢复会话</legend>
<br/>
<label for="logid">登录帐号 : </label>
<input type="input" id="logid" name="logid" style="width:200px" value=""/>
<br/>
<label for="password">登录密码 : </label>
<input type="password" id="password" name="pwd" style="width:200px" value=""/>
<br/>
</fieldset>
<div>
<input type="button" onclick="javascript:login();" id="button1" value=" 确 定 "/>
<input type="reset" id="button2" value=" 取 消 "/>
</div>
</form>
</body>
</html>